package com.zelix;

import java.io.*;
import java.util.Enumeration;
import java.util.Hashtable;

public class yo
    implements ey
{

    private wu a;
    private cy b;
    private Hashtable c;
    private final boolean d;
    private iy e;
    private wu f;
    private fy g;
    private fy h;
    private static final Boolean i;
    private static final Boolean j;
    private static String z[];

    public yo(wu wu1, boolean flag)
    {
        e = new iy();
        f = new wu();
        g = new fy();
        h = new fy();
        a = wu1;
        d = flag;
        wu1.a(this);
        a();
    }

    public void b()
    {
        if(c != null)
            c.clear();
        g.a();
        h.a();
        e.a();
        if(b != null)
            b.a();
    }

    public final boolean a(String s, String s1)
        throws yb
    {
        if(s.equals(z[0]))
            return false;
        Boolean boolean1 = (Boolean)g.b(s1, s);
        if(boolean1 != null)
            return boolean1.booleanValue();
        mt mt1 = a(s);
        String s2 = mt1.z();
        if(s2.equals(s1))
        {
            g.b(s1, s, i);
            return true;
        }
        if(s2.equals(z[0]))
        {
            g.b(s1, s, j);
            return false;
        } else
        {
            boolean flag = a(s2, s1);
            g.b(s1, s, flag ? ((Object) (i)) : ((Object) (j)));
            return flag;
        }
    }

    public final boolean b(String s, String s1)
        throws yb {
        mt mt1;
        cv cv1;
        if (s.equals(z[0]))
            return false;
        Boolean boolean1 = (Boolean) h.b(s1, s);
        if (boolean1 != null)
            return boolean1.booleanValue();
        mt1 = a(s);
        cv1 = new cv(mt1.u());
        while (cv1.hasMoreElements()) {
            String s2 = (String) cv1.nextElement();
            if (s2.equals(s1)) {
                h.b(s1, s, i);
                return true;
            }
            boolean flag = b(s2, s1);
            if (flag) {
                h.b(s1, s, i);
                return true;
            }
        }
        String s3 = mt1.z();
        boolean flag1 = b(s3, s1);
        h.b(s1, s, flag1 ? ((Object) (i)) : ((Object) (j)));
        return flag1;
    }

    public mt a(String s)
        throws yb
    {
        if(s.startsWith("["))
            s = z[0];
        mt mt1 = (mt)c.get(s);
        if(mt1 != null)
            return mt1;
        try
        {
            nc nc1 = b.a(s);
            if(nc1 == null)
                throw new zb(s, lt.a(s) + z[7]);
            sx sx1 = new sx(0);
            java.io.InputStream inputstream = nc1.a(sx1);
            if(inputstream != null)
            {
                jb jb1 = jb.a(inputstream, sx1.b());
                StringWriter stringwriter = new StringWriter();
                PrintWriter printwriter = new PrintWriter(stringwriter);
                StringWriter stringwriter1 = new StringWriter();
                PrintWriter printwriter1 = new PrintWriter(stringwriter1);
                ty ty1 = new ty(4, 3, 5, 5);
                mt mt2 = new mt(jb1, nc1, f, e, printwriter, printwriter1, ty1);
                if(!s.equals(mt2.j()))
                {
                    String s1 = nc1.d();
                    String s2 = nc1.b();
                    if(s2 != null)
                        throw new yb(z[6] + s1 + z[5] + s2 + z[2] + mt2.l() + z[8] + lt.a(s) + z[4]);
                    else
                        throw new yb(z[6] + s1 + z[2] + mt2.l() + z[8] + lt.a(s) + z[4]);
                } else
                {
                    c.put(s, mt2);
                    return mt2;
                }
            } else
            {
                throw new zb(s, lt.a(s) + z[1]);
            }
        }
        catch(IOException ioexception)
        {
            throw new yb("'" + lt.a(s) + z[3] + ioexception.getMessage());
        }
        catch(qb qb1)
        {
            throw new yb(qb1.getMessage());
        }
        catch(zb zb1)
        {
            throw zb1;
        }
        catch(tb tb1)
        {
            throw new yb(tb1.getMessage());
        }
    }

    private void a()
    {
        if(b != null)
            b.a();
        b = new cy((String)a.a(), d);
        c = new Hashtable();
    }

    public void a(gs gs, Object obj, Object obj1, Object obj2)
    {
        a();
    }

    private static String z(char[] chs) {
        for (int i = 0; i < chs.length; i++) {
            byte key = 0;
            switch (i % 5) {
                case 0:
                    key = 0x64;
                    break;
                case 1:
                    key = 38;
                    break;
                case 2:
                    key = 62;
                    break;
                case 3:
                    key = 114;
                    break;
                default:
                    key = 28;
                    break;
            }
            chs[i] ^= key;
        }
        return new String(chs).intern();
    }

    static
    {
        String as[];
        as = new String[9];
        as[0] = "\016GH\0233\bGP\0253+DT\027\177\020";
        as[1] = "DHQ\006<\002IK\034xJ\006}\032y\007M\036\006t\001\006]\036}\027UN\023h\f\006Q\002h\rIPR}\nB\036\000y\bI_\0262D\016\f[";
        as[2] = "C\006]\035r\020GW\034oDRV\027<\007J_\001oD\001";
        as[3] = "C\006X\033p\001\006[\000n\013T\036H<";
        as[4] = "C\006_\001<\001^N\027\177\020CZ\\";
        as[5] = "C\006W\034<C";
        as[6] = "\"OR\027<C";
        as[7] = "DHQ\006<\002IK\034xJ\006}\032y\007M\036\006t\001\006]\036}\027UN\023h\f\006Q\002h\rIPR}\nB\036\000y\bI_\0262D\016\017[";
        as[8] = "C\006L\023h\fCLRh\fGPR;";
        for(int i=0;i<as.length;i++){
            z(as[i].toCharArray());
        }
        z = as;
        i = Boolean.TRUE;
        j = Boolean.FALSE;
    }
}
